package jgl.vajra.operator.part.mine.model;

import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.operator.bean.InvitePrizeBalanceBean;
import jgl.vajra.operator.part.mine.contract.InvitePrizeContract;
import jgl.vajra.operator.widget.manager.RxJavaHttpManager;
import jgl.vajra.operator.widget.manager.retrofit.RetrofitJsonManager;

public class InvitePrizeModel extends InvitePrizeContract.Model{
    @Override
    public Observable<InvitePrizeBalanceBean> getInvitePrizeBalanceData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getInvitePrizeBalanceData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<InvitePrizeBalanceBean> getInvitePrizeOwnerData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getInvitePrizeOwnerData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<InvitePrizeBalanceBean> getInvitePrizeOperatorData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getInvitePrizeOperatorData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<InvitePrizeBalanceBean> getInvitePrizeSumData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getInvitePrizeSumData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<String> getWithdrawalBalanceData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getWithdrawalBalanceData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
